<?php
/* @var $this SiteController */

$this->pageTitle=Yii::app()->name;
?>
<div class="container" style="width:600px;height:400px;padding-top:100px">
    <div class="jumbotron">
			<form action="<?php echo Yii::app()->request->baseUrl; ?>/notification/addNewMajor" method="post" accept-charset="utf-8" role="form">
				<div class="container">
					<h2>添加专业</h2>
					<table class="table">  
						<tr>
							<td>
								<select type="text" name="department" class="form-control" placeholder="院系名" required>
									<?php
										$list=Department::model()->findAll();
										$res='<option value="">请选择所属院系</option>';
										for ($i=0;$i<count($list);$i++)
											$res=$res.'<option value="'.$list[$i]->department_id.'">'.$list[$i]->name.'</option>';
										echo $res;
									?>
								</select>
							</td>
						</tr>
						<tr>
							<td><input type="text" name="name" class="form-control" placeholder="专业名" required /></td>
						</tr>
						<tr>
							<td><input class="btn btn-primary" type="submit" role="button" value="添加"/></td>
							<td><a class="btn btn-success" href="<?php echo Yii::app()->request->baseUrl; ?>/notification/majorManagePage" role="button">返回</a></td> 
						</tr>  
					</table>  
				</div>
			</form>
	</div>
</div>

